package com.san.InterfManage.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.san.InterfManage.dao.InterfExamineDao;
import com.san.InterfManage.domain.InterfExamineDo;
import com.san.InterfManage.service.InterfExamineService;
import com.san.common.utils.PageUtils;
import com.san.common.utils.Query;

@Service
public class InterfExamineServiceImpl implements InterfExamineService{
	@Autowired
	private InterfExamineDao interfExamineMapper;
	@Override
	public PageUtils findListSource(Query query) throws Exception {
		List<InterfExamineDo> list = interfExamineMapper.findListSource(query);
		int total = interfExamineMapper.findListSourceCount(query);
		PageUtils pageUtils = new PageUtils(list, total);

		return pageUtils;
	}
	@Override
	public PageUtils queryinterf(Query query) throws Exception {
		// TODO Auto-generated method stub
		List<InterfExamineDo> list = interfExamineMapper.queryinterf(query);
		int total = interfExamineMapper.queryinterfCount(query);
		PageUtils pageUtils = new PageUtils(list, total);

		return pageUtils;
	}
	@Override
	public Object getById(Long id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public int save(Object obj) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public int doEdit(Object obj) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public int remove(Long id) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public int batchRemove(Long[] ids) throws Exception {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public int add(InterfExamineDo interfExamineDo) throws Exception {
		// TODO Auto-generated method stub
		return interfExamineMapper.add(interfExamineDo);
	}
	@Override
	public int update(InterfExamineDo interfExamineDo) throws Exception {
		// TODO Auto-generated method stub
		return interfExamineMapper.update(interfExamineDo);
	}
	/**
	 * 查询待审核的申请
	 */
	@Override
	public PageUtils verify(Query query) throws Exception {
		List<InterfExamineDo> list = interfExamineMapper.verify(query);
		int total = interfExamineMapper.verifyCount(query);
		PageUtils pageUtils = new PageUtils(list, total);
		return pageUtils;
	}
	@Override
	public int changeStatus(InterfExamineDo interfExamineDo) throws Exception{
		// TODO Auto-generated method stub
		return interfExamineMapper.changeStatus(interfExamineDo);
	}


}
